<div class="row-fluid">    
    <div class="span12">
        <?php echo $this->element('message'); ?>   
        <form action="" class="well" id="AuthorizeSettingsForm" method="post" accept-charset="utf-8">
            <div style="display:none;">
                <input type="hidden" name="_method" value="PUT">
            </div>        
            <fieldset>
                <legend>Authorize Settings</legend>                
                <div class="control-group required">
                    <label for="api_login_id">API Login ID</label>
                    <input name="api_login_id" maxlength="45" type="text" value="<?php echo (isset($data['AuthorizeSettings']) ? $data['AuthorizeSettings']['api_login_id'] : ''); ?>" id="api_login_id" required="required">
                </div>

                <div class="control-group required">
                    <label for="payment_action">Payment Action</label>
                    <select name="payment_action" help="" id="payment_action">
                        <option value="AUTH_ONLY" <?php echo ((isset($data['AuthorizeSettings']) && strtoupper($data['AuthorizeSettings']['payment_action']) == 'AUTH_ONLY') ? 'selected=selected' : ''); ?>>Authorize Only</option>
                        <option value="AUTH_CAPTURE" <?php echo ((isset($data['AuthorizeSettings']) && strtoupper($data['AuthorizeSettings']['payment_action']) == 'AUTH_CAPTURE') ? 'selected=selected' : ''); ?>>Authorize and Capture</option>
                    </select>
                </div>

                <div class="control-group required">
                    <label for="transaction_key">Transaction Key</label>
                    <input name="transaction_key" maxlength="45" type="text" value="<?php echo (isset($data['AuthorizeSettings']) ? $data['AuthorizeSettings']['transaction_key'] : ''); ?>" id="transaction_key" required="required">
                </div>

                <div class="control-group required">
                    <label for="price">Price</label>
                    
                    <div class="input-append">
                        <input name="price" maxlength="45" type="number" value="<?php echo (isset($data['AuthorizeSettings']) ? $data['AuthorizeSettings']['price'] : '0'); ?>" id="price" required="required">
                        <span class="add-on">$</span>
                    </div>
                </div>

                <div class="control-group">
                    <label for="test_mode">Sandbox Mode</label>
                    <select name="test_mode" help="" id="test_mode">
                        <option value="1" <?php echo ((isset($data['AuthorizeSettings']) && $data['AuthorizeSettings']['test_mode']) ? 'selected=selected' : ''); ?>>Yes</option>
                        <option value="0" <?php echo ((isset($data['AuthorizeSettings']) && !$data['AuthorizeSettings']['test_mode']) ? 'selected=selected' : ''); ?>>No</option>
                    </select>
                </div>
            </fieldset>        
            <div class="submit">
                <input class="btn btn-primary" type="submit" value="Save">
            </div>
        </form>    
    </div>
</div>